package demo1;

import java.util.Iterator;

public class Test {

    public static void main(String[] args) {

    }
    public static void main2(String[] args) {
        MyListStack myListStack=new MyListStack();
        myListStack.push(12);
        myListStack.push(22);
        myListStack.push(32);
        myListStack.push(42);
        myListStack.push(52);
        myListStack.push(62);

        System.out.println(myListStack.pop());
        System.out.println(myListStack.pop());
        System.out.println(myListStack.pop());
        System.out.println(myListStack.peek());
        System.out.println(myListStack.peek());
    }
    public static void main1(String[] args) {
        MyStack myStack=new MyStack();
        myStack.push(12);
        myStack.push(15);
        myStack.push(20);
        myStack.push(22);
        myStack.push(25);
        while(!myStack.empty()){
            System.out.print(myStack.pop() + " ");
        }
    }
}
